Skip to main content

Vote & Giveaway

Vote & Giveaway API​

The API related to voting and Giveaway information.

Gethttps://open.debox.pro/openapi/behavior/vote​

Obtain the number of votes cast by the current address user in the current group

Parameters​

Query​

wallet_address : Wallet address, which represents a user

chain_id : Blockchain network ID, default 1, Ethereum Mainnet

group_invite_url : Group share URL, which represents a group

X-API-KEY App Key, apply on platform https://developer.debox.pro/

Responses​

200: OK​
# vote_number   Number of votes
{
"code": 200,
"data": {
"vote_number": 6//Number of votes
},
"message": "success",
"success": true
}
400: Bad Request​
{"error":"Bad Request","code":400,"message":"You X-API-KEY is not available"}

Gethttps://open.debox.pro/openapi/behavior/lucky_draw​

GET https://open.debox.pro/openapi/verify_join Get the number of Luckydraws of the current address user in the current group

Parameters​

Query​

wallet_address : Wallet address, which represents a user

chain_id : Blockchain network ID, default value 1, Ethereum mainnet

group_invite_url : Group share URL, which represents a group

Header​

X-API-KEY App Key, apply on platform https://developer.debox.pro/

Responses​

200: OK​
# initiate_luckDraw_total Total number of draws initiated
# luckDraw_total Total number of entries to the draw
# luckDraw_win_total Total number of wins
{
"code": 1,
"data": {
"initiate_luckDraw_total": 3,
"luckDraw_total": 3,
"luckDraw_win_total": 3
},
"message": "success",
"success": true
}
400: Bad Request​
{"error":"Bad Request","code":400,"message":"You X-API-KEY is not available"}